home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)t8.d64
/
names utility.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
2KB
|
73 lines
80 OPEN15,8,15:POKE53281,12:POKE53280,12:PRINTCHR$(5)CHR$(14)CHR$(8)
90 DIM SN$(100):Z$=CHR$(0)
100 PRINT"[147]NAMES UTILITY
110 [153]"ENTER FILE NAME
120 INPUT" [191][157][157][157]";F$
125 IFF$="[191]"THENPRINT"[145]";:GOTO120
130 PRINT"IS THIS N[146]EW OR E[146]XISTING":GS$="NE":GOSUB6000:ONVGOSUB3000,7000
135 PRINT"[147]NAMES UTILITY
140 [153]"MAKE A SELECTION
150 PRINT" A. LIST NAMES
160 [153]" B. ADD NAMES
170 PRINT" C. CHANGE NAMES
190 [153]" D. EXIT/SAVE REWORKED FILE
200 GS$="ABCD":GOSUB6000
210 ONVGOTO300,1000,2000
220 IFCF=1THEN8000
230 END
300 PRINT"[147][206]AME LIST":J=0
310 PRINT"S[146]CREEN OR P[146]RINTER":GS$="SP":GOSUB6000:DV=V:GOSUB5800
320 FORI=1TONS:J=J+1
330 PRINTSN$(I):IFJ=20THENGOSUB5900:J=0:PRINT:GOSUB5800
340 NEXT
350 GOSUB5900:GOTO135
1000 PRINT"[147][193]DD NAMES UTILITY
1020 [133]"ENTER NAME SINCMDCMDCMD";A$
1030 [139]A$[178]"SIN"[167][137]135
1040 NS[178]NS[170]1:SN$(NS)[178]A$
1050 CF[178]1:[137]1020
2000 [133]"LOADENTER NAME TO CHANGE CMD SINCMDCMDCMD";A$
2020 [139]A$[178]"SIN"[167]135
2030 SS[178][195](A$)
2040 [129]I[178]1[164]NS:LL[178][195](SN$(I))[171]SS[170]1
2050 [129]J[178]1[164]LL
2060 [139]A$[179][177][202](SN$(I),J,SS)[167]2070
2061 [153]"FOUND "SN$(I)", CHANGE? YWAIT/N
2062 GS$="NY":GOSUB6000:IFV=1THEN2075
2063 PRINT"ENTER REVISED NAME"
2064 INPUT" [191][157][157][157]";A$
2065 IFA$="[191]"THENPRINT"[145]";:GOTO2065
2066 SN$(I)=A$
2067 CF=1:GOTO2090
2070 NEXTJ
2075 NEXTI
2080 PRINT"NO MATCH FOUND"
2090 GOSUB5990:GOTO2000
2100 GS$=CHR$(13)
3000 PRINT"[147][195]REATE FILE
3010 [159]8,8,8,"N"[170]F$[170]",S,W" :[141]10000:[160]8
3020 [137]1020
5800 [159]4,DV[170]2,6:[157]4:[142]
5900 [152]4:[160]4
5990 [153]"PRESS RETURNWAIT TO CONTINUE":GS$[178][199](13)
6000 [161]B$:[129]V[178]1[164][195](GS$):[139]B$[178][202](GS$,V,1)[167][142]
6010 [130]:[137]6000
7000 [153]"READING NAMES, PLEASE STAND BY
7010 OPEN8,8,8,"N"+F$+",S,R":GOSUB10000
7020 GET#8,A$:NS=ASC(A$+CHR$(0))
7030 FORI=1TONS:INPUT#8,SN$(I):NEXT
7040 CLOSE8:PRINT"[196][207][206][197]":RETURN
8000 PRINT"WRITING NAMES, PLEASE STAND BY"
8010 PRINT#15,"S0:NME.BACKUP":GOSUB10000
8020 PRINT#15,"R0:NME.BACKUP=N"+F$ :GOSUB10000
8030 OPEN8,8,8,"N"+F$+",S,W":GOSUB10000
8040 PRINT#8,CHR$(NS);
8050 FORI=1TONS:PRINT#8,SN$(I):NEXT
8060 CLOSE8
8070 PRINT"[194]ACKUP COPY? Y[146]/N" :GS$="YN":GOSUB6000:IFV=2THENEND
8080 PRINT"INSERT SECOND DISK AND PRESS RETURN"
8090 GS$=CHR$(13):GOSUB6000:GOTO8010
10000 REM DISK ERROR CHECK
10010 INPUT#15,X,Z$:IFX<=1THENRETURN
10020 PRINTX,Z$:STOP